<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>精灵图</title>
    <style>
        *{
            margin: 0 auto;
            padding: 0;
            list-style: none;
        }
        ul{
            margin: 50px auto;
            width: 500px;

        }
        ul li{
            width: 70px;
            height: 60px;
            float: left;
            border: 1px solid #ccc;
            border-left: none;
            text-align: center;
            padding: 10px 0;

        }
        ul li:first-child{
            border-left: 1px solid #ccc;
        }
        ul li span{
            
            padding: 12px;
            display: inline-block;
            background: url("image/sprites.png");
            padding-top: 20px;
            
        }
        ul li p{
            font-size: 14px;
            text-align: center;
        }
        /* 水平精灵 */
        .item-1 span{
            /* background: url("image/sprites.png"); */
        }
        .item-2 span{
            /* background: url("image/sprites.png"); */
            /* background-position-x: -30px; */
        }
        .item-3 span{
            /* background: url("image/sprites.png"); */
            /* background-position-x: -60px; */
        }
        .item-4 span{
            /* background: url("image/sprites.png"); */
            /* background-position-x: -90px; */
        }

        /* 垂直精灵 */
        .item-1 span{
            /* background: url("image/sprites.png"); */
        }
        .item-2 span{
            /* background: url("image/sprites.png"); */
            background-position-y: -42px;
        }
        .item-3 span{
            /* background: url("image/sprites.png"); */
            background-position-y: -86px;
        }
        .item-4 span{
            /* background: url("image/sprites.png"); */
            background-position-y: -130px;
        }

        /* 定点精灵 */
        .item-1 span{
            /* background: url("image/sprites.png"); */
            /* background-position: -90px -30px; */
        }
        .item-2 span{
            /* background: url("image/sprites.png"); */
            /* background-position: -60px -60px; */
        }
        .item-3 span{
            /* background: url("image/sprites.png"); */
            /* background-position: -90px -60px; */
        }
        .item-4 span{
            /* background: url("image/sprites.png"); */
            /* background-position: -60px -30px; */
        }
    </style>
</head>
<body>
    <!-- 垂直精灵 -->
   <ul>
       <li class="item-1">
           <span></span>
           <p>充话费</p>
       </li>
       <li class="item-2">
           <span></span>
           <p>旅行</p>
       </li>
       <li class="item-3">
           <span></span>
           <p>车险</p>
       </li>
       <li class="item-4">
           <span></span>
           <p>游戏</p>
       </li>
   </ul>
</body>
</html>